<?php


namespace app\app\validate;


use think\Validate;

class AttrValidate extends Validate
{
    protected $rule = [
        'form' => 'require',
        // 'attr' => 'require',
        // 'gid' => 'require'
    ];
    protected $message = [
        'form.require' => '属性不能为空',
        // 'attr.require' => '属性不能为空',
        // 'gid.require' => 'gid错误',
    ];
    protected $scene = [
        'add' => ['form'],
        // 'add' => ['attr','gid'],
        'edit' => ['attr','gid']
    ];

}